// 配置别名
const path = require('path');

function resolve(dir) {
  return path.join(__dirname, dir);
}

module.exports = {
  lintOnSave: true,
  chainWebpack: config => {
    config.resolve.alias
      .set("@", resolve("src"))
      .set("assets", resolve("src/assets"))
      .set("components", resolve("src/components"))
      .set("utils", resolve("src/utils"));
  },
  publicPath:
    process.env.NODE_ENV === "production"
      ? "//shared.ydstatic.com/ead/dynamic/dynamic-template/content/facebook_ad/"
      : "/"
};
